<template>
	<view class="template-collect tn-safe-area-inset-bottom">
		<!-- 顶部自定义导航 -->
		<tn-nav-bar fixed alpha customBack>
			<view slot="back" class='tn-custom-nav-bar__back' @click="goBack">
				<text class='icon tn-icon-left'></text>
				<text class='icon tn-icon-home-capsule-fill'></text>
			</view>
		</tn-nav-bar>


		<view class="a" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
			<text>支付{{statusText}}</text>
		</view>
	</view>
</template>

<script>
import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
import Tools from '@/tools/config.js'
export default {
	name: 'TemplateRecharge',
	mixins: [template_page_mixin],
	data(){
		return{
			orderNo:"",
			statusText:"",
		}
	},
	onLoad(options){
		this.orderNo = options.orderNo
		this.initData()
	},
	methods:{
		initData(){
			uni.showLoading({
				title:"查询中"
			})
			let theopenid = uni.getStorageSync('openid')
			let theunionid = uni.getStorageSync('unionid')
			uni.request({
				url: Tools.host + '/wshly.ashx',
				method: 'POST',
				data: {
					'lx': 'user_czjf_ztcx',
					'openid': theopenid,
					'unionid': theunionid,
					'out_trade_no': this.orderNo
				},
				success: (res) => {
					//成功
					const a = JSON.parse(res.data.data)
					this.statusText = a.ztsm
				},
				fail: (res) => {
					console.log('失败' + res)
					uni.showModal({
						title: '失败，请稍后重试',
						showCancel: false
					})
				},
				complete() {
					uni.hideLoading()
				}
			});
		},
	}
}
	
</script>

<style lang="scss" scoped>
	
.tn-custom-nav-bar__back {
	width: 100%;
	height: 100%;
	position: relative;
	display: flex;
	justify-content: space-evenly;
	align-items: center;
	box-sizing: border-box;
	background-color: rgba(0, 0, 0, 0.15);
	border-radius: 1000rpx;
	border: 1rpx solid rgba(255, 255, 255, 0.5);
	color: #FFFFFF;
	font-size: 18px;

	.icon {
		display: block;
		flex: 1;
		margin: auto;
		text-align: center;
	}

	&:before {
		content: " ";
		width: 1rpx;
		height: 110%;
		position: absolute;
		top: 22.5%;
		left: 0;
		right: 0;
		margin: auto;
		transform: scale(0.5);
		transform-origin: 0 0;
		pointer-events: none;
		box-sizing: border-box;
		opacity: 0.7;
		background-color: #FFFFFF;
	}
}

.a{
	display:flex;
	align-items: center;
	justify-content: center;
	height:30vh;
	text{
		font-size: 30rpx;
		color:#333;
	}
}

</style>